<template>
    <transition name="fade">
        <div class="toast-warp">
            <div class='toast'>
                <div class="text">
                    <slot name="text">提示</slot>
                </div>
            </div>
        </div>
    </transition>
</template>

<script>
export default {

}
</script>

<style lang="less" scoped>
.toast-warp {
    position: fixed;
    display: -webkit-flex;
    align-items: center; //justify-content: center;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1000000;
    .toast {
        position: absolute;
        bottom: 2rem;
        padding: 1em;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.5);
        border-radius: 4px;
        color: #fff;
        text-align: center;
        .text {
            color: #fff;
            font-size: 0.24rem;
        }
    }
}
</style>